package com.hsmw.api.controller.driver;


import com.hsmw.api.service.HsmwDriverClassVideoService;
import com.htn.common.core.base.DataResponse;
import com.htn.common.core.constant.CommonConstants;
import com.hsmw.domain.HsmwDriverClassVideo;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import com.hsmw.common.base.BaseController;

/**
 * <p>
 * 司机学习视频表 前端控制器
 * </p>
 *
 * @author wd
 * @since 2021-09-06
 */
@RestController
@RequestMapping("/hsmw/video")
public class HsmwDriverClassVideoController extends BaseController<HsmwDriverClassVideoService, HsmwDriverClassVideo> {



    @Autowired
    private HsmwDriverClassVideoService hsmwDriverClassVideoService;


    @ApiOperation(value = " 新增 修改 信息", notes = "新增 修改 信息", produces = "application/json")
    @PostMapping("/saveOrUpdateVideo")
    public DataResponse saveOrUpdateVideo(@RequestBody HsmwDriverClassVideo hsmwDriverClassVideo){
        if(hsmwDriverClassVideo == null){
            return new DataResponse(CommonConstants.ResponseStatus.FAIL,"传递参数错误");
        }

        return hsmwDriverClassVideoService.saveOrUpdateVideo(hsmwDriverClassVideo);
    }

}

